CREATE
OR REPLACE PROCEDURE yz_cnt_info_insert_htqd (p_phid IN NUMBER) AS BEGIN
INSERT INTO
    p_form_htq_m (
        phid,
        phid_org,
        bill_no,
        phid_pc,
        u_yzht,
        u_jfdw,
        u_xmmc,
        u_htje,
        bill_dt,
        app_status,
        ng_insert_dt,
        ng_update_dt,
        ng_record_ver,
        wf_flag
    )
SELECT
    seq_auto_phid_yz_cnt_info.nextval,
    phid_org,
    bill_no,
    phid_pc,
    p_phid,
    phid_customer_ent,
    phid_pc,
    user_htje,
    TRUNC (SYSDATE),
    0,
    TRUNC (SYSDATE),
    TRUNC (SYSDATE),
    2,
    0
FROM
    pcm3_cnt_m
WHERE
    phid = p_phid;

commit;

EXCEPTION WHEN OTHERS THEN DBMS_OUTPUT.PUT_LINE ('插入失败，错误信息：' || SQLERRM);

RAISE;

ROLLBACK;

END yz_cnt_info_insert_htqd;